Skip to content

feat: do not create device messages for IMAP authentication errors - #8629

Open
link2xt wants to merge 1 commit into
mainfrom
link2xt/no-cannot-login-device-message
Open

feat: do not create device messages for IMAP authentication errors#8629
link2xt wants to merge 1 commit into
mainfrom
link2xt/no-cannot-login-device-message

Conversation

@link2xt

@link2xt link2xt commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Authentication failures may happen because of internal server errors. Device message saying "Please check if the email address and the password are correct" was written for classic email setups when the user knows the password. For users of chatmail relays this message is not actionable, but still appears when relay fails to check the password.

Closes #8614 if merged.

#8589 (preferring login errors over connection errors) still makes sense even if device message is deleted as it is important for the error during configuration.

@link2xt
link2xt force-pushed the link2xt/no-cannot-login-device-message branch 2 times, most recently from 6c72378 to 2a9b07f Compare August 24, 2026 18:32
break
# Password is wrong so it definitely has to say something about "password"
assert "password" in ev.data2
# Password is wrong so the error should be about authentication

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test is not testing the message anymore, in a way it is a test for #8589 (it is theoretically flaky otherwise)

@link2xt
link2xt marked this pull request as ready for review August 24, 2026 18:51
Comment thread src/imap.rs Outdated
Comment on lines +399 to +400
warn!(context, "IMAP failed to login as {}: {err:#}.", lp.user);
first_error.get_or_insert(err);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be nice to add IMAP failed to login as {imap_user} also to the error both logged and shown to the user.

Authentication failures may happen because of internal server errors.
Device message saying "Please check if the email address and the password are correct"
was written for classic email setups when the user knows the password.
For users of chatmail relays this message is not actionable,
but still appears when relay fails to check the password.
@link2xt
link2xt force-pushed the link2xt/no-cannot-login-device-message branch from 2a9b07f to c6e321e Compare August 25, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Cannot login" device message likely does more harm than good for multirelay setups

2 participants